<template>
  <div>hello</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

const myMixin1 = {
  methods: {
    foo1() {
      console.log("myMixin：", "foo1 from mixin1");
    },
  },
};
const myMixin2 = {
  methods: {
    foo2() {
      console.log("myMixin：", "foo2 from mixin2");
    },
  },
};

export default defineComponent({
  mixins: [myMixin1, myMixin2],
  mounted() {
    this.foo1();
    this.foo2();
    this.bar();
  },
  methods: {
    bar() {
      console.log("组件：", "bar from component");
    },
  },
});
</script>

<style scoped></style>
